package utils

import (
	"encoding/json"
	"log"
	"os"
)

func JsonDecodeFile(path string) map[string]interface{} {
	data, err := os.ReadFile(path)
	if err != nil {
		log.Println("Error reading file:", path, err)
		return nil
	}
	var result map[string]interface{}
	err = json.Unmarshal(data, &result)
	if err != nil {
		log.Println("Error unmarshalling JSON from file:", path, err)
		return nil
	}
	return result
}
